<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>LinearGradient (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">graphics.LinearGradient</span>
        <span>Extends</span>
        <span class="fn-name">
          <a href="class_goog_graphics_Fill.html">
          goog.graphics.Fill
</a>
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Creates an immutable linear gradient fill object.


  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="local_closure_goog_graphics_lineargradient.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/local/closure/goog/graphics/lineargradient.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td><span class="type"><a href="class_goog_graphics_Fill.html">goog.graphics.Fill</a></span></td><td></td></tr>
  <tr><td>goog.graphics.LinearGradient</td><td><span class="type"><a href="class_goog_graphics_Fill.html">goog.graphics.Fill</a></span></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.graphics.LinearGradient(<span><span class="arg">x1</span>,&nbsp;<span class="arg">y1</span>,&nbsp;<span class="arg">x2</span>,&nbsp;<span class="arg">y2</span>,&nbsp;<span class="arg">color1</span>,&nbsp;<span class="arg">color2</span>,&nbsp;<span class="arg">opt_opacity1</span>,&nbsp;<span class="arg">opt_opacity2</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">x1</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">Start X position of the gradient.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">y1</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">Start Y position of the gradient.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">x2</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">End X position of the gradient.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">y2</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">End Y position of the gradient.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">color1</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">Start color of the gradient.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">color2</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">End color of the gradient.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_opacity1</span>
        : <span>?</span><span class="type">number=</span>
        <div class="entryOverview">Start opacity of the gradient, both or neither
    of opt_opacity1 and opt_opacity2 have to be set.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_opacity2</span>
        : <span>?</span><span class="type">number=</span>
        <div class="entryOverview">End opacity of the gradient.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_graphics_LinearGradient.html">
              goog.graphics.LinearGradient
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.graphics.LinearGradient.prototype.getColor1"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getColor1<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line149">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.graphics.LinearGradient.prototype.getColor2"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getColor2<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line157">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.graphics.LinearGradient.prototype.getOpacity1"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getOpacity1<span class="args">()</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The start opacity of the gradient.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line165">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.graphics.LinearGradient.prototype.getOpacity2"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getOpacity2<span class="args">()</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The end opacity of the gradient.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line173">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.graphics.LinearGradient.prototype.getX1"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getX1<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The start X position of the gradient.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line117">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.graphics.LinearGradient.prototype.getX2"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getX2<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The end X position of the gradient.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line133">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.graphics.LinearGradient.prototype.getY1"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getY1<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The start Y position of the gradient.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line125">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.graphics.LinearGradient.prototype.getY2"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getY2<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The end Y position of the gradient.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line141">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_graphics_Fill.html">
              goog.graphics.Fill
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.graphics.Fill.prototype.getColor1"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getColor1<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The start color of a gradient fill.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_fill.js.source.html#line39">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.graphics.Fill.prototype.getColor2"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getColor2<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The end color of a gradient fill.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_fill.js.source.html#line45">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_graphics_LinearGradient.html">
              goog.graphics.LinearGradient
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.graphics.LinearGradient.prototype.color1_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">color1_</span>
        : 
     </div>


     <div class="entryOverview">
       Start color of the gradient.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line84">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.graphics.LinearGradient.prototype.color2_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">color2_</span>
        : 
     </div>


     <div class="entryOverview">
       End color of the gradient.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line91">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.graphics.LinearGradient.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line50">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.graphics.LinearGradient.prototype.opacity1_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">opacity1_</span>
        : 
     </div>


     <div class="entryOverview">
       Start opacity of the gradient.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line102">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.graphics.LinearGradient.prototype.opacity2_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">opacity2_</span>
        : 
     </div>


     <div class="entryOverview">
       End opacity of the gradient.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line109">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.graphics.LinearGradient.prototype.x1_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">x1_</span>
        : 
     </div>


     <div class="entryOverview">
       Start X position of the gradient.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line56">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.graphics.LinearGradient.prototype.x2_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">x2_</span>
        : 
     </div>


     <div class="entryOverview">
       End X position of the gradient.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line70">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.graphics.LinearGradient.prototype.y1_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">y1_</span>
        : 
     </div>


     <div class="entryOverview">
       Start Y position of the gradient.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line63">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.graphics.LinearGradient.prototype.y2_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">y2_</span>
        : 
     </div>


     <div class="entryOverview">
       End Y position of the gradient.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line77">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>










<div class="section">
  <table class="horiz-rule">


  </table>
</div>



<h2>Static Properties</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.graphics.LinearGradient.superClass_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.graphics.LinearGradient.</span><span class="entryName">superClass_</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_graphics_lineargradient.js.source.html#line50">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package graphics</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="graphics.LinearGradient"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
